package com.pucong.gitee.database.backup.common.entity.redis.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@ApiModel("redis 修改key名称 和 时长 dto")
public class RenameKeyRedisDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("旧")
    private int index;

    @NotBlank
    @ApiModelProperty("旧")
    private String oldKey;

    @NotBlank
    @ApiModelProperty("新")
    private String newKey;

    @NotNull
    @ApiModelProperty("有效时间")
    private long oldTime;

    @NotNull
    @ApiModelProperty("有效时间")
    private long newTime;
}
